import random

def generate_data(m, n, max_cost=10):
    """
    随机生成horizontalCut和verticalCut
    :param m: 行数
    :param n: 列数
    :return: (m, n, horizontalCut, verticalCut)
    """
    horizontalCut = [random.randint(1, max_cost) for _ in range(m - 1)]
    verticalCut = [random.randint(1, max_cost) for _ in range(n - 1)]
    return m, n, horizontalCut, verticalCut
